package effizienz;
public class Suche{
  public static void main(String[] args){
    int[] z={1,2,2,4,7,8,8,9,11,22,23,50};
    int s=Integer.parseInt(args[0]);
    System.out.println(search(z, s));
  }

  public static boolean search(int[] z, int s){
    for(int i=0; i<z.length; ++i)
      if(s==z[i]) return true;
    return false;
  }

  public static boolean binarysearch(int[] z, int s){
    int li=0, re=z.length-1, m=0;
    while(li!=re){
      m=(li+re)/2;
      if(z[m]<s) li=m+1;
      else re=m;
    }
    return s==z[m];
  }
}
